<%@ page contentType="text/html;charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html class="w99b h99b over_auto">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta http-equiv="Expires" content="0">
<%@ include file="/WEB-INF/views/common/jsinclude.jsp" %>
<title>客户</title>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
	shortcut.add("Enter",function(e) {
		sendTabKeyByShortcut(e);
	},{
		'type':'keydown',
		'propagate':true,
		'disable_in_input':false,
		'target':document.getElementById("iEditForm"),
		'keycode':true
	});
	
	shortcut.add("Ctrl+S",function(e) {
		fnSaveChange();
	},{
		'type':'keydown',
		'propagate':false,
		'disable_in_input':false,
		'target':document,
		'keycode':false
	});
	$("#idReset").click(function(){
		iEditForm.reset();
	});
	$("#idSave").click(function(){
		fnSaveChange();
	});
	//焦点
	focusonFirst();
});

function fnSaveChange(){
<c:choose>
<c:when test="${entityCustomer==null or entityCustomer.id==0}">
	iEditForm.action="${ctx}/entityCustomer/add.do";
</c:when>
<c:otherwise>
	iEditForm.action="${ctx}/entityCustomer/update.do";
</c:otherwise>
</c:choose>
	iEditForm.submit();
}
</script>
</head>
<body>
<div class="page_header clearfix">
    <span class="page_header_title">客户</span>
</div>
<div class="hr_title"></div>
<div class="align_left">
	<input type="button" class="form_button" name="btnSave"  id="idSave"  value="保存"/>
	<input type=button   class="form_button" name="btnReset" id="idReset" value="清空"/>
</div>
<div class="hr_heng"></div>
<div class="form_area">
<form name="iEditForm" id="iEditForm" action="" method="post">
<table border="0" cellspacing="5" cellpadding="0" width="100%" class="editTable">
<tr>
<td width="1%" class="tdLabel" nowrap>客户ID</td>
<td width="50%" class="tdField" nowrap><input type="text" name="id" value="${entityCustomer.id}" size="20" maxlength="10" class="inputText"/></td>
<td width="1%" class="tdLabel" nowrap>客户名称</td>
<td width="50%" class="tdField" nowrap><input type="text" name="name" value="${entityCustomer.name}" size="40" maxlength="100" class="inputText"/></td>
</tr>
<tr>
<td width="1%" class="tdLabel" nowrap>客户编码</td>
<td width="50%" class="tdField" nowrap><input type="text" name="code" value="${entityCustomer.code}" size="20" maxlength="20" class="inputText"/></td>
<td width="1%" class="tdLabel" nowrap>客户简称</td>
<td width="50%" class="tdField" nowrap><input type="text" name="shortname" value="${entityCustomer.shortname}" size="30" maxlength="30" class="inputText"/></td>
</tr>
<tr>
<td width="1%" class="tdLabel" nowrap>单位邮编</td>
<td width="50%" class="tdField" nowrap><input type="text" name="officeZipcode" value="${entityCustomer.officeZipcode}" size="20" maxlength="20" class="inputText"/></td>
<td width="1%" class="tdLabel" nowrap>单位电话</td>
<td width="50%" class="tdField" nowrap><input type="text" name="officeTel" value="${entityCustomer.officeTel}" size="20" maxlength="20" class="inputText"/></td>
</tr>
<tr>
<td width="1%" class="tdLabel" nowrap>单位传真</td>
<td width="50%" class="tdField" nowrap><input type="text" name="officeFax" value="${entityCustomer.officeFax}" size="20" maxlength="20" class="inputText"/></td>
<td width="1%" class="tdLabel" nowrap>地址</td>
<td width="50%" class="tdField" nowrap><input type="text" name="address" value="${entityCustomer.address}" size="40" maxlength="200" class="inputText"/></td>
</tr>
<tr>
<td width="1%" class="tdLabel" nowrap>联系人</td>
<td width="50%" class="tdField" nowrap><input type="text" name="linkMan" value="${entityCustomer.linkMan}" size="30" maxlength="30" class="inputText"/></td>
<td width="1%" class="tdLabel" nowrap>备注</td>
</tr>
</table>
</form>
</div>
</body>
</html>